<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <!-- Meta, title, CSS, favicons, etc. -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Cache-Control" content="no-cache" />
    <meta name="description" content="长沙市妇幼医院">
    <script src="./js/jquery.min.js"></script>
    <script src="./js/area/LAreaData2.js"></script>
    <script src="./js/sweetalert.min.js"></script>
    <script src="./js/sampleSheetCommon.js"></script>
    
    <link rel="stylesheet" type="text/css" href="./css/sweetalert.min.css">
    <link rel="stylesheet" type="text/css" href="./css/defaultsheetinfo.css">
    
    
    <title>长沙市健康民生项目</title>

    <!-- Documentation extras -->
    <style>
        .sheet_text{
            display: flex;
            height: auto;
        }
        .sheet_value{
            flex: 1;
        }
    </style>
    
    <script>
        var hospitalData = '';
        var errorMsg = '';
        var couponNum='';
        var sampleBaseId='';
        personInfo = {id:'',name:'',barcodeImg:''}
        $(document).ready(function(){
            initUrlInfo();
            doQuery(couponNum,sampleBaseId);
        })
        function initUrlInfo(){
            var url = location.search;
            url = decodeURI(url);
            url = decodeURI(url);
            var Request = new Object();
            if(url.indexOf("?")!=-1){
                var str = url.substr(1);//去掉?号
                strs = str.split("&");
                for(var i=0;i<strs.length;i++){
                    var key = strs[i].split("=")[0];
                    var value = unescape(strs[i].split("=")[1]);
                    Request[key]=value;
                    var keyId = '#' + key;
                    $(keyId).text(value);
                }
            }
            couponNum = Request['couponNum']||'';
            sampleBaseId = Request['sampleBaseId']||'';
            if(couponNum){
                hasCoupon(true)
            }else{
                hasCoupon(false)
            }
        }
        function hasCoupon(flag){

        }
        $(function () {
            if (2 === 1) {
                $("#prompt_message_block").css("background-color", "#ffa800");
            }
            if (errorMsg) {
                $("#tip").css("display", "block");
                setTimeout(closeErrorMsg, 3000);
            }
            analysisIvfRemark();
        });

        function closeErrorMsg() {
            $("#tip").css("display", "none");
        }

        function checkForm() {
            $("#formBtn").attr('disabled', "true");
            $("#ban_bt").css('background', '0');
            $("#formBtn").css('color', '#ACACAC');
            return true;
        }
        var infoKeys = ['customerName','departments','doctorName','bedNum','caseNum','sampleType','bloodDate','sampleName','motherName','sampleSex','birthDate','nativePlace','nationaltily','samplePhoneNum','idCard','addressProvince','addressCity','addressCounty','addressStreet','pregnancyInfection','consanguineousMarriage','medicationHistory','familyDeafness','earDeformity',];
        function fillInfos(order){//页面信息填充
            for(var k in infoKeys){
                var infoKey = infoKeys[k];
                $('#'+infoKey).text(order[infoKey]);
            }
        }
    </script>

    <script>
        function analysisIvfRemark(remark) {
            var ivfRemark = remark + "";
            if (ivfRemark === '') return;
            var ivfRemarkText = "";
            if (ivfRemark === '0') {
                ivfRemarkText = "着床一胎";
            }
            if (ivfRemark === '10') {
                ivfRemarkText = "着床两胎,两胎均正常";
            }
            if (ivfRemark === '1211') {
                ivfRemarkText = "着床两胎,一胎停育或减胎,8周内丢失胚胎,距停育后继续妊娠8周及以上"
            }
            $("#ivfRemarkText").text(ivfRemarkText);
        }
        function showCoupon(){
            tipsMsg()
        }
        function tipsMsg(tiptext){//打开提示框
            $("#fade").css('display','block');
            $("#tipDia").css('display','block');
        }

        function closeTips(){//关闭提示框
            $("#tipDia").css('display','none');
            $("#fade").css('display','none');
        }
        function slidePersoninfo(){
        	$("#personInfo").slideToggle("slow");
        	$("#personSlideIco").toggleClass('ico_up');
        	$("#personSlideIco").toggleClass('ico_down');
        }
        function slideSampleinfo(){
        	$("#sampleInfo").slideToggle("slow");
        	$("#sampleSlideIco").toggleClass('ico_up');
        	$("#sampleSlideIco").toggleClass('ico_down');
        }
        function slideIdcardinfo(){
        	$("#idCardImg").slideToggle("idCardSlideIco");
        	$("#idCardSlideIco").toggleClass('ico_up');
        	$("#idCardSlideIco").toggleClass('ico_down');
        }
    </script>
</head>

<body>
    <div id="content">
        <div id="prompt_message_block" class="prompt_message_block">
         <p id="statusTitle" align="center" class="prompt_message_l" >送检单详情</p>
        </div>

         <div>
            <div class="sheet_top">
                <div class="start_block"></div>
                <div class="sheet_top_text">
                    <b>免/自费券二维码</b>
                </div>
            </div>
            <div id="couponBarcode">
            </div> 
        </div>
        <div>
            <div class="sheet_top" onclick="slidePersoninfo()">
                <div class="start_block"></div>
                <div class="sheet_top_text">
                    <b>个人信息</b>
                </div>
                <div id="personSlideIco" class="ico_up"></div>
            </div>
            <div class="sheet_necessary_content round"  id="personInfo">
            </div> 
           
        </div>
        
         <div >
            <div class="sheet_top" onclick="slideIdcardinfo()">
                <div class="start_block"></div>
                <div class="sheet_top_text">
                    <b>证件照片</b>
                </div>
                <div id="idCardSlideIco" class="ico_up"></div>
            </div>
            <div class="sheet_necessary_content round" id="idCardImg">
            </div> 
        </div>
        <div>
            <div class="sheet_top" onclick="slideSampleinfo()">
                <div class="start_block"></div>
                <div class="sheet_top_text">
                    <b>送检单信息</b>
                </div>
                <div id="sampleSlideIco" class="ico_up"></div>
            </div>
            <div class="sheet_necessary_content round" id="sampleInfo">
            </div>
               
           
        </div>
        <div id="operationArea" class="operationArea">

               
           
        </div>
    </div>
    <div id="tip" style="display: none;">
        <p id="tipmsg"></p>
    </div>
    <!-- 遮罩层 -->
    <div id="fade" class="black_overlay"></div>
    <!-- 提示框 -->
    <div id="tipDia" class="tips">
        <p id="tipmsg" style="text-align:center;" class="tips-msg">免费券</p>
        <div class="coupon_box">
            <img id='barcodeImg' style="width:80%;height:80%;display:block;margin:auto;" src="./images/order/coupon_code.png">
        </div>
        <div class="tips-line"></div>
        <p class="dbutton" onclick="closeTips();">返回</p>
    </div>
    
</body>
</html>